<template>
  <div id="my" class="">
    <div class="green">我的</div>
    <div class="pd20">
      <div class="enter">
        <div to="/login" class="go" @click="goLogin">
          <img :src="img" alt="" />
          <span>{{ nike }}</span>
        </div>
        <div class="two-parts">
          <van-grid clickable :column-num="2" class="two">
            <van-grid-item icon="after-sale" text="我的订单" to="/order" />
            <van-grid-item
              icon="balance-pay"
              text="红包卡卷"
              url="/vant/mobile.html"
            />
          </van-grid>
        </div>
      </div>
      <van-cell-group inset>
        <van-cell title="我的地址" is-link to="addressAll" icon="location-o" />
        <van-cell title="常见问题" is-link to="index" icon="question-o" />
        <van-cell title="用户协议" is-link to="index" icon="description" />
        <van-cell title="关于我们" is-link to="index" icon="friends-o" />
        <van-cell title="联系店长" is-link to="index" icon="service-o" />
        <van-cell title="修改密码" is-link to="index" icon="edit" />
      </van-cell-group>
      <van-button round type="default" @click="tui()">退出登录</van-button>
    </div>
  </div>
</template>
<script>

export default {
  data() {
    return {
      img: null,
      nike: "登录",
    };
  },
  methods: {
    goLogin() {
      this.$router.push("/login");
    },
  },
  created() {},
  mounted() {
    if (sessionStorage.getItem("islogin")) {
      this.nike = sessionStorage.getItem("isnike");
      this.img=sessionStorage.getItem("isimg")
    }
  },
};
</script>
<style lang="less" scoped>
body {
  background-color: #f3f4f6;
}
.green {
  width: 100%;
  height: 300px;
  background-color: #03a19c;
  text-align: center;
  color: #fff;
  padding-top: 50px;
  box-sizing: border-box;
}
.enter {
  border-radius: 20px;
  overflow: hidden;
  background-color: #fff;
  margin: -100px auto 20px;
  .go {
    height: 150px;
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
    padding: 40px 0 0 40px;
    img {
      width: 90px;
      height: 90px;
      border-radius: 50%;
      background-color: #5bccc8;
      vertical-align: middle;
      margin-right: 20px;
    }
    span {
      color: #111;
      font-size: 18px;
    }
  }
}

.van-button {
  width: 100%;
  color: red;
  margin-top: 20px;
  height: 90px;
}
</style>